<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html, body, #app{
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div id="app">
        <h2>测试网页</h2>
        <a href="http://www.baidu.com">百度</a>
        <input type="text">
    </div>

    <script>
        //获取元素
        let app = document.querySelector("#app");

        app.addEventListener('touchstart', function(e){
            e.preventDefault();
        });

        let a = document.querySelector("a");
        a.addEventListener('touchstart', function(e){
            //阻止冒泡
            e.stopPropagation();
        });

        let input = document.querySelector("input");
        input.addEventListener('touchstart', function(e){
            e.stopPropagation();
        })

    </script>
</body>
</html>